/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * MenuInicial.java
 *
 * Created on 13/06/2011, 16:09:14
 */
package lp2.projeto;

/**
 *
 * @author Edgard
 */
public class MenuInicial extends javax.swing.JFrame {

    /** Creates new form MenuInicial */
    public MenuInicial() {
        initComponents();
    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        panelPainelPrincipal = new javax.swing.JPanel();
        botaoChamaCadastrar = new javax.swing.JButton();
        botaoChamaRecomendacoes = new javax.swing.JButton();
        botaoSair = new javax.swing.JButton();
        panelPainelAcabamento = new javax.swing.JPanel();
        labelJava = new javax.swing.JLabel();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Pitaqueiro Das 12hs");

        botaoChamaCadastrar.setText("Cadastrar");
        botaoChamaCadastrar.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botaoChamaCadastrarActionPerformed(evt);
            }
        });

        botaoChamaRecomendacoes.setText("Recomendacoes");
        botaoChamaRecomendacoes.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botaoChamaRecomendacoesActionPerformed(evt);
            }
        });

        botaoSair.setText("Sair");
        botaoSair.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                botaoSairActionPerformed(evt);
            }
        });

        panelPainelAcabamento.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        labelJava.setIcon(new javax.swing.ImageIcon(getClass().getResource("/lp2/projeto/almoco_informal.jpg"))); // NOI18N

        javax.swing.GroupLayout panelPainelAcabamentoLayout = new javax.swing.GroupLayout(panelPainelAcabamento);
        panelPainelAcabamento.setLayout(panelPainelAcabamentoLayout);
        panelPainelAcabamentoLayout.setHorizontalGroup(
            panelPainelAcabamentoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelPainelAcabamentoLayout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(labelJava)
                .addContainerGap())
        );
        panelPainelAcabamentoLayout.setVerticalGroup(
            panelPainelAcabamentoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelPainelAcabamentoLayout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(labelJava)
                .addContainerGap())
        );

        javax.swing.GroupLayout panelPainelPrincipalLayout = new javax.swing.GroupLayout(panelPainelPrincipal);
        panelPainelPrincipal.setLayout(panelPainelPrincipalLayout);
        panelPainelPrincipalLayout.setHorizontalGroup(
            panelPainelPrincipalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelPainelPrincipalLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(panelPainelAcabamento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(31, 31, 31)
                .addGroup(panelPainelPrincipalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(botaoChamaCadastrar, javax.swing.GroupLayout.DEFAULT_SIZE, 111, Short.MAX_VALUE)
                    .addComponent(botaoChamaRecomendacoes, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(botaoSair, javax.swing.GroupLayout.DEFAULT_SIZE, 111, Short.MAX_VALUE))
                .addContainerGap())
        );
        panelPainelPrincipalLayout.setVerticalGroup(
            panelPainelPrincipalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(panelPainelPrincipalLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(panelPainelAcabamento, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(28, Short.MAX_VALUE))
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelPainelPrincipalLayout.createSequentialGroup()
                .addContainerGap(89, Short.MAX_VALUE)
                .addComponent(botaoChamaCadastrar)
                .addGap(41, 41, 41)
                .addComponent(botaoChamaRecomendacoes)
                .addGap(40, 40, 40)
                .addComponent(botaoSair)
                .addGap(101, 101, 101))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(panelPainelPrincipal, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(26, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addComponent(panelPainelPrincipal, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
        );

        java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
        setBounds((screenSize.width-594)/2, (screenSize.height-378)/2, 594, 378);
    }// </editor-fold>//GEN-END:initComponents

    private void botaoChamaRecomendacoesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botaoChamaRecomendacoesActionPerformed
        // TODO add your handling code here:
        setVisible(false);
        new Recomendacoes().setVisible(true);
    }//GEN-LAST:event_botaoChamaRecomendacoesActionPerformed

    private void botaoSairActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botaoSairActionPerformed
        // TODO add your handling code here:
        System.exit(1);
    }//GEN-LAST:event_botaoSairActionPerformed

    private void botaoChamaCadastrarActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_botaoChamaCadastrarActionPerformed
        // TODO add your handling code here:
        setVisible(false);
        new Cadastramento().setVisible(true);
    }//GEN-LAST:event_botaoChamaCadastrarActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new MenuInicial().setVisible(true);
            }
        });
    }
    
    // ImageIcon icon = new ImageIcon("caminho/logo.gif");
//JLabel label = new JLabel(icon);
//Depois é só adicionar o label no seu frame... 
    
    
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton botaoChamaCadastrar;
    private javax.swing.JButton botaoChamaRecomendacoes;
    private javax.swing.JButton botaoSair;
    private javax.swing.JLabel labelJava;
    private javax.swing.JPanel panelPainelAcabamento;
    private javax.swing.JPanel panelPainelPrincipal;
    // End of variables declaration//GEN-END:variables
}